import type { ExtensibleEntityDto, ExtensibleObject } from '@abp/ng.core';
import type { DocumentStatus } from '../core/document-status.enum';
import type { SupplierDto } from '../suppliers/models';
import type { AuxiliaryUnitDto, ItemMasterDto } from '../item-masters/models';

export interface AsnCreateDto extends AsnCreateOrUpdateBase {
  children: AsnLineCreateOrUpdateDto[];
}

export interface AsnCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  orderTypeId?: string;
  supplierId?: string;
  shipmentContact?: string;
  phone?: string;
  licensePlate?: string;
  shipmentDate?: string;
  arriveDate?: string;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface AsnDocumentDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderType: AsnTypeDto;
  supplierId?: string;
  supplier: SupplierDto;
  shipmentContact?: string;
  phone?: string;
  licensePlate?: string;
  shipmentDate?: string;
  arriveDate?: string;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface AsnDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderTypeId?: string;
  orderType: AsnTypeDto;
  supplierId?: string;
  supplier: SupplierDto;
  shipmentContact?: string;
  phone?: string;
  licensePlate?: string;
  shipmentDate?: string;
  arriveDate?: string;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  children: AsnLineDto[];
  concurrencyStamp?: string;
}

export interface AsnLineCreateOrUpdateDto extends ExtensibleObject {
  id?: string;
  documentId?: string;
  itemMasterId?: string;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  purchasingQuantity: number;
  receivedQuantity: number;
  unitId?: string;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface AsnLineDto extends ExtensibleEntityDto<string> {
  documentId?: string;
  document: AsnDocumentDto;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  purchasingQuantity: number;
  receivedQuantity: number;
  unitId?: string;
  unit: AuxiliaryUnitDto;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface AsnTypeCreateDto extends AsnTypeCreateOrUpdateBase {
}

export interface AsnTypeCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface AsnTypeDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface AsnTypeUpdateDto extends AsnTypeCreateOrUpdateBase {
  concurrencyStamp?: string;
}

export interface AsnUpdateDto extends AsnCreateOrUpdateBase {
  concurrencyStamp?: string;
  children: AsnLineCreateOrUpdateDto[];
}
